/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.shailan.util.fem.model;

import com.shailan.util.fem.node.Node;
import com.shailan.util.fem.*;
import java.util.Vector;

/**
 *
 * @author Bahadir SAYLAN
 */
public class Model2DTruss  {
    private Vector nodes= new Vector(),elements= new  Vector();
    private int nodesNum=0,elemNum=0;
    public void addNode(float x,float y){
        nodes.add(new Node(nodesNum,x, y,0.0f));
        nodesNum++;
    }
    public Node getNode(int index){
        return (Node)nodes.get(index);
    }

    public void addElement(Element e){
        elements.add(e);
        elemNum++;
    }
    
    public Element getElement(int index){
        return (Element)elements.get(index);
    }

    public Vector getNodes(){
        return this.nodes;
    }

    public Vector getElements(){
        return this.elements;
    }
}
